# -*- coding: UTF-8 -*-
# Python算术运算符
print "\n------ 算术运算符 ------"
# 幂 - 返回x的y次幂
a = 2
b = 3
print a ** b
# 取整除 - 返回商的整数部分（向下取整）
a = 10
b = 4
print a // b
# 整数除整数，只能得出整数。如果要得到小数部分，把其中一个数改成浮点数即可
print a / float(b)

# 比较运算符
print "\n------ 比较运算符 ------"
a = 10
b = 10
print a == b
print a != b
print a > b
print a >= b

# 逻辑运算符
print "\n------ 逻辑运算符 ------"
a = 10
b = 20
print a and b
print a or b
print not (a and b)

# 成员运算符
print "\n------ 成员运算符 ------"
a = 10
b = 2
list = [1, 2, 3, 4, 5]
print a in list
print a not in list
print b in list

# 身份运算符
print "\n------ 身份运算符 ------"
a = 20
b = 20
c = 30
print a is b
print a is not b
print a is c
print a is not c

# 运算符优先级